home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group94a.txt
/
000019_icon-group-sender _Fri Jan 14 04:57:58 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1994-08-19
|
1KB
Received: by cheltenham.cs.arizona.edu; Thu, 20 Jan 1994 09:07:11 MST
Date: 14 Jan 94 04:57:58 GMT
From: bloom-beacon.mit.edu!pad-thai.aktis.com!noc.near.net!news.delphi.com!dligda@uunet.uu.net (David Ligda)
Organization: Delphi Internet Services Corporation
Subject: Need help outputing to file
Message-Id: <9401132354591.dligda.DLITE@delphi.com>
Sender: icon-group-request@cs.arizona.edu
To: icon-group@cs.arizona.edu
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
Hello All,
I need some help with a very simple ICON program.
I would like to write a program that takes two command line paramaters
(input file and output file), reads each line from the input file and writes
it to the output file. Here is what I have so far:
procedure main(args)
in := open(args[1]) | stop("Can't open input file")
out := open(args[2], "w") | stop("cannot open output file")
#
# Loop to process lines of file.
#
while out := read(in) do {
write(out)
}
end
This seems to read the input file O.K. but writes the output to the screen
rather than the output file.
Any hints on what I am doing wrong?
Thanks in advance.
David